<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateWySalesOrgShareTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('wy_sales_org_share', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('org_id')->nullable()->comment('机构ID');
            $table->tinyInteger('type')->comment('1. 定制推荐提成点数 2. 间接推荐提成点数');
            $table->decimal('percentage', 9, 1)->comment('提成比例百分比，小数点后1位小数');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('wy_sales_org_share');
    }
}
